using ProtoModels;
using UnityEngine;

public class LeaderboardSegmentedPrizeEntry : MonoBehaviour
{
	public UILabel prizeLabel;

	public UILabel cashLabel;

	public UILabel coinsLabel;

	public UILabel tokensLabel;

	public UISprite background;

	public UISprite backgroundTop;

	public void Init(Lead.SegmentedLeaderboard.RankRange rankRange, Color colorBck, Color colorTop)
	{
		LeaderboardsAdapter.ClientPrize clientPrize = new LeaderboardsAdapter.ClientPrize(rankRange.prizes);
		background.color = colorBck;
		backgroundTop.color = colorTop;
		UITools.ChangeText(prizeLabel, rankRange.name);
		UITools.ChangeText(cashLabel, clientPrize.cash.ToString());
		UITools.ChangeText(coinsLabel, clientPrize.coins.ToString());
		UITools.ChangeText(tokensLabel, clientPrize.tokens.ToString());
	}
}
